from django.test import TestCase
from django.core.urlresolvers import reverse

class ViewTests(TestCase):
    fixtures = "test_useragents",
    def testUseragentList(self):
        response = self.client.get(reverse('useragent-list', kwargs=dict(page="1")))
        self.assertContains(response, "List of User Agents")

    def testUseragentDetail(self):
        response = self.client.get(reverse('useragent-detail', kwargs=dict(object_id="1")))
        self.assertContains(response, "User Agent Detail")
        self.assertContains(response, "Opera")
        self.assertContains(response, "9.62")
